const server = require("../../myconfig.js").config.serverApi;

function requestCardInfo(cardId){
  return new Promise((resolve,reject)=>{
    wx.request({
      method:"POST",
      url:server+"select/card",
      data:{
        "card_id":cardId
      },
      success:function(res){
        console.log("成功请求到会员卡的详细信息",JSON.stringify(res.data))
        resolve(res.data)
      },
      fail:function(err){
        reject(err)
      }
    })
  })
}
module.exports={
  requestCardInfo:requestCardInfo
}